package resultHandler;

import org.apache.commons.dbutils.ResultSetHandler;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;

public class MyTableListHandler implements ResultSetHandler {
    @Override
    public List<String> handle(ResultSet resultSet) throws SQLException {
        List<String> tableList = new ArrayList<>();
        while (resultSet.next()){
            String string = (String) resultSet.getString(1);
            tableList.add(string);
//            System.out.println(string);
        }
        return tableList;
    }
}
